package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venueservice.enumeration.DepositWarningPriceTypeEnum;
import com.eastfair.venueservice.enumeration.DepositWarningWarningStandardJudgeEnum;
import com.eastfair.venueservice.enumeration.DepositWarningWarningStandardEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 押金预警
 * </p>
 *
 * @author linan
 * @since 2023-02-17
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vsm_deposit_warning")
@ApiModel(value = "DepositWarning", description = "押金预警")
@AllArgsConstructor
public class DepositWarning extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 创建人姓名
     */
    @ApiModelProperty(value = "创建人姓名")
    @Size(max = 255, message = "创建人姓名长度不能超过255")
    @TableField(value = "created_name", condition = LIKE)
    @Excel(name = "创建人姓名")
    private String createdName;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会id")
    private Long exhibitionManageId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    @TableField(value = "exhibition_manage_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionManageName;

    /**
     * 预警名称
     */
    @ApiModelProperty(value = "预警名称")
    @Size(max = 255, message = "预警名称长度不能超过255")
    @TableField(value = "warning_name", condition = LIKE)
    @Excel(name = "预警名称")
    private String warningName;

    /**
     * 预警对象类型
     */
    @ApiModelProperty(value = "预警对象类型")
    @Size(max = 255, message = "预警对象类型长度不能超过255")
    @TableField(value = "service_provider_type", condition = LIKE)
    @Excel(name = "预警对象类型")
    private String serviceProviderType;

    /**
     * 预警对象id
     */
    @ApiModelProperty(value = "预警对象id")
    @TableField(value = "service_provider_id")
    @Excel(name = "预警对象id")
    private Long serviceProviderId;

    /**
     * 预警对象名称
     */
    @ApiModelProperty(value = "预警对象名称")
    @Size(max = 255, message = "预警对象名称长度不能超过255")
    @TableField(value = "service_provider_name", condition = LIKE)
    @Excel(name = "预警对象名称")
    private String serviceProviderName;

    /**
     * 预警标准 #{SIMPLE_SERVICE_AMOUNT:单项服务金额;TOTAL_SERVICE_AMOUNT:总服务金额;}
     */
    @ApiModelProperty(value = "预警标准 #{SIMPLE_SERVICE_AMOUNT:单项服务金额;TOTAL_SERVICE_AMOUNT:总服务金额;}")
    @TableField(value = "warning_standard")
    @Excel(name = "预警标准 #{SIMPLE_SERVICE_AMOUNT:单项服务金额;TOTAL_SERVICE_AMOUNT:总服务金额;}", replace = {"单项服务金额_SIMPLE_SERVICE_AMOUNT", "总服务金额_TOTAL_SERVICE_AMOUNT",  "_null"})
    private DepositWarningWarningStandardEnum warningStandard;

    /**
     * 预警标准判断 #{GREATER_THAN:大于;EQUAL:等于;GREATER_THAN_OR_EQUAL:大于或等于;}
     */
    @ApiModelProperty(value = "预警标准判断 #{GREATER_THAN:大于;EQUAL:等于;GREATER_THAN_OR_EQUAL:大于或等于;}")
    @TableField(value = "warning_standard_judge")
    @Excel(name = "预警标准判断 #{GREATER_THAN:大于;EQUAL:等于;GREATER_THAN_OR_EQUAL:大于或等于;}", replace = {"大于_GREATER_THAN", "等于_EQUAL", "大于或等于_GREATER_THAN_OR_EQUAL",  "_null"})
    private DepositWarningWarningStandardJudgeEnum warningStandardJudge;

    /**
     * 金额类型 #{BOND:保证金金额;OTHER:其他金额（可自定义输入）;}
     */
    @ApiModelProperty(value = "金额类型 #{BOND:保证金金额;OTHER:其他金额（可自定义输入）;}")
    @TableField(value = "price_type")
    @Excel(name = "金额类型 #{BOND:保证金金额;OTHER:其他金额（可自定义输入）;}", replace = {"保证金金额_BOND", "其他金额（可自定义输入）_OTHER",  "_null"})
    private DepositWarningPriceTypeEnum priceType;

    /**
     * 金额
     */
    @ApiModelProperty(value = "金额")
    @TableField(value = "price")
    @Excel(name = "金额")
    private BigDecimal price;

    /**
     * 短信模版CODE
     */
    @ApiModelProperty(value = "短信模版CODE")
    @Size(max = 255, message = "短信模版CODE长度不能超过255")
    @TableField(value = "msg_temp_code", condition = LIKE)
    @Excel(name = "短信模版CODE")
    private String msgTempCode;

    /**
     * 邮件模版CODE
     */
    @ApiModelProperty(value = "邮件模版CODE")
    @Size(max = 255, message = "邮件模版CODE长度不能超过255")
    @TableField(value = "email_temp_code", condition = LIKE)
    @Excel(name = "邮件模版CODE")
    private String emailTempCode;


    @Builder
    public DepositWarning(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String createdName, Long exhibitionManageId, String exhibitionManageName, String warningName, String serviceProviderType, Long serviceProviderId, 
                    String serviceProviderName, DepositWarningWarningStandardEnum warningStandard, DepositWarningWarningStandardJudgeEnum warningStandardJudge, DepositWarningPriceTypeEnum priceType, BigDecimal price, String msgTempCode, String emailTempCode) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.createdName = createdName;
        this.exhibitionManageId = exhibitionManageId;
        this.exhibitionManageName = exhibitionManageName;
        this.warningName = warningName;
        this.serviceProviderType = serviceProviderType;
        this.serviceProviderId = serviceProviderId;
        this.serviceProviderName = serviceProviderName;
        this.warningStandard = warningStandard;
        this.warningStandardJudge = warningStandardJudge;
        this.priceType = priceType;
        this.price = price;
        this.msgTempCode = msgTempCode;
        this.emailTempCode = emailTempCode;
    }

}
